import useDrag from '../hooks/useDragInPc';
const baseStyle = {width:'100px',height:'100px',borderRadius:'50%'};
function Drag(){
    const [style,dragRef] = useDrag();
    const styleObj = {
        ...baseStyle,
        backgroundColor:'red',
        transform:`translate(${style.x}px,${style.y}px)`
    }
    return (
        <>
            <div
                ref={dragRef}
                style={styleObj}
            ></div>
        </>
    )
}
export default Drag;